#! /usr/bin/env python
# -*- coding: utf-8 -*-

from django.conf import settings
from utils.tencent.mysms import SMS


def send_single_sms(ph_number, params, tpl_id):
    """
    发送短信
    :param ph_number: 号码
    :param params: [code, time]
    :param tpl_id: 模板id
    :return:
    """
    sms = SMS(settings.SMS_ID, settings.SMS_KEY)
    res = sms.sendSingleMsg(ph_number, template_id=tpl_id, params=params, sign=settings.SMS_SIGN)
    # print(res)
    return res
